package com.wmy.luckywheel.mapper;


import com.wmy.luckywheel.entity.po.Record;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Sian37
 */
@Mapper
public interface RecordMapper {

    /**
     * 插入一条记录
     */
    @Insert("insert into record(prize_id, name, create_time) " +
            "values (#{prizeId}, #{name}, #{createTime})")
    void add(Record record);

    @Select("select * from record order by create_time desc")
    List<Record> queryList();
}
